package com.handinglian.system.mapper;

import com.handinglian.system.entity.UserRoleRelation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserRoleRelationMapper {
    int deleteByPrimaryKey(@Param("userId") Integer userId, @Param("roleId") Integer roleId);

    int insert(UserRoleRelation record);

    int insertOrUpdate(UserRoleRelation record);

    int insertOrUpdateSelective(UserRoleRelation record);

    int insertSelective(UserRoleRelation record);

    int updateBatch(List<UserRoleRelation> list);

    int batchInsert(@Param("list") List<UserRoleRelation> list);

    List<UserRoleRelation> findByRoleId(@Param("roleId")Integer roleId);

    int updateRoleIdByUserId(@Param("updatedRoleId")Integer updatedRoleId,@Param("userId")Integer userId);

    int deleteByUserId(@Param("userId")Integer userId);


}